Skip to content

replace fwd_scale with norm kwarg in mkl_fft #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2025
Merged

replace fwd_scale with norm kwarg in mkl_fft #189

merged 1 commit into from
Aug 13, 2025

Conversation

vtavana
Copy link
Collaborator

@vtavana vtavana commented May 20, 2025

Both NumPy and SciPy use norm parameter which is the normalization mode that is used scaling the FFT results. mkl_fft has the scaling parameter fwd_scale directly. In this PR, fwd_scale is replaced with norm to be aligned with NumPy and SciPy.

@vtavana vtavana self-assigned this May 20, 2025
@vtavana vtavana marked this pull request as ready for review May 21, 2025 02:26
@vtavana vtavana force-pushed the revisit_overwrite_x branch from fb12707 to 31e17ab Compare June 3, 2025 21:27
@vtavana vtavana force-pushed the revisit_overwrite_x branch 2 times, most recently from eadecd3 to 12677c0 Compare June 6, 2025 15:48
@vtavana vtavana force-pushed the add-norm branch 2 times, most recently from 12de45d to 66c6ff2 Compare June 6, 2025 15:52
Copy link
Collaborator

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you @vtavana

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vtavana vtavana changed the base branch from revisit_overwrite_x to master August 13, 2025 12:33
@Copilot Copilot AI review requested due to automatic review settings August 13, 2025 12:36
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the fwd_scale parameter with norm parameter in mkl_fft functions to align with NumPy and SciPy FFT interfaces. The change makes the API more consistent with standard FFT libraries.

  • Replaced fwd_scale parameter with norm parameter across all FFT functions
  • Updated function signatures in both interface modules and core implementation
  • Modified tests to use norm parameter instead of fwd_scale

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
mkl_fft/_mkl_fft.py Updated core FFT function signatures to use norm parameter and added internal computation of forward scale factor
mkl_fft/interfaces/_scipy_fft.py Removed _compute_fwd_scale usage and passed norm directly to underlying FFT functions
mkl_fft/interfaces/_numpy_fft.py Removed _compute_fwd_scale usage and passed norm directly to underlying FFT functions
mkl_fft/tests/test_fftnd.py Updated test cases to use norm parameter, removed scaling-specific test class, added None value test
mkl_fft/_fft_utils.py Minor string formatting improvements unrelated to main change
README.md Updated function signatures in documentation to reflect norm parameter
CHANGELOG.md Added entry documenting the parameter replacement

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@IntelPython IntelPython deleted a comment from Copilot AI Aug 13, 2025
@vtavana vtavana merged commit 46c8b3f into master Aug 13, 2025
61 checks passed
@vtavana vtavana deleted the add-norm branch August 13, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants